package com.borko.healthcare.persistence.hibernate.services;

import java.util.List;

import com.borko.healthcare.entities.interfaces.Notification;
import com.borko.healthcare.persistence.hibernate.dao.NotificationDAO;

public class NotificationManagerImpl implements NotificationManager {
	
	private NotificationDAO notificationDAO;

	public NotificationDAO getNotificationDAO() {
		return this.notificationDAO;
	}

	public void setNotificationDAO(NotificationDAO notificationDAO) {
		this.notificationDAO = notificationDAO;
	}

	public void add(Notification notification) {
		notificationDAO.create(notification);
	}

	public void applyChanges(Notification notification) {
		notificationDAO.update(notification);
	}

	public List<Notification> list() {
		return notificationDAO.retrive();
	}

	public void remove(Notification notification) {
		notificationDAO.delete(notification);
	}

	public Notification getNotification(int id) {
		return notificationDAO.getNotification(id);
	}

}
